﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SkillUI : MonoBehaviour
{
	Animator ani;
	public SkillUIType type;


	private bool skillState;
	public bool SkillState => skillState;

	private void Start() {
		ani = GetComponent<Animator>();
	}

	/// <summary>
	/// 设置后技能不能使用, 在冷却中
	/// </summary>
	public void CloseSkill() {
		ani.SetBool("IsHide", true);
	}

	/// <summary>
	/// 设置后技能可以使用
	/// </summary>
	public void OpenSkill() {
		ani.SetBool("IsHide", false);
		// Debug.Log(Time.realtimeSinceStartup);
	}


	public void OnEnterAniEvent() {
		skillState = true;
	}

	public void OnExitAniEvent() {
		// Debug.Log(Time.realtimeSinceStartup);
		skillState = false;
	}


}
